TARGET		= dcview

CXX		= g++
CXXFLAGS	= -O2 -Wall
CXXIDFLAGS	= -I./include -F./framework
CXXLDFLAGS	= -L./lib -ldc1394

CXXSRC		= main.cpp DCTool.cpp DCDevice.cpp
CXXOBJS		= $(CXXSRC:.cpp=.o)


RM		= rm -f


.SUFFIXES: .o .cpp


all: depend $(TARGET)


$(TARGET): $(CXXOBJS)
	$(CXX) $(CXXFLAGS) -o $@ $^ $(CXXLDFLAGS)

.cpp.o:
	$(CXX) $(CXXFLAGS) $(CXXIDFLAGS) -c $<

depend:
	$(RM) .depend;
	for src in $(CXXSRC); do\
		$(CXX) -MM $$src >> .depend;\
	done
-include .depend

clean:
	$(RM) $(CXXOBJS)
	$(RM) *~ #*
	$(RM) $(TARGET)

